const DBUtil=require("../utils/DBUtil");
class Score_infoService{
  //查询成绩
  queryScore(s_id,exam_id){
    return new Promise((resolve,reject)=>{
      var conn=DBUtil.getConn();
      //此处查询的是视图
      conn.query("select * from scoreinfoview where s_id=? and exam_id=?",[s_id,exam_id],(err,result)=>{
        if(err){
          reject(err);
        }
        else{
          resolve(result);
        }
        conn.end();
      });
    });
  }
}

module.exports=Score_infoService;